from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',

    url(r'^$',       'planner.views.index'),
    url(r'^twitter$', 'planner.views.twitter_connect'),
    url(r'^twitter/callback$', 'planner.views.twitter_connect'),
    url(r'^login$',  'planner.views.login_view'),
    url(r'^logout$', 'planner.views.logout_view'),
    url(r'^signup$', 'planner.views.signup'),
    url(r'^users$', 'planner.views.list_users'),
    url(r'^users/(?P<userid>\d+)$', 'planner.views.detail_user'),
    url(r'^trips$', 'planner.views.list_trips'),
    url(r'^trips/add$', 'planner.views.new_trip'),
    url(r'^trips/submit$', 'planner.views.submit_trip'),
    url(r'^trips/(?P<tripname>\d+)$', 'planner.views.detail_trip'),
    url(r'^trips/(?P<tripname>\d+)/edit$', 'planner.views.edit_trip'),
    url(r'^trips/(?P<tripname>\d+)/update$', 'planner.views.submit_edited_trip'),
    url(r'^trips/(?P<tripname>\d+)/add_poi$', 'planner.views.new_poi'),
    url(r'^trips/(?P<tripname>\d+)/submit$', 'planner.views.submit_poi'),
    url(r'^trips/(?P<tripname>\d+)/(?P<poiname>\d+)/vote$','planner.views.vote_for_poi'),
    url(r'^trips/(?P<tripname>\d+)/(?P<poiname>\d+)/edit$','planner.views.edit_poi'),
    url(r'^trips/(?P<tripname>\d+)/(?P<poiname>\d+)/update$', 'planner.views.submit_edited_poi'),
    url(r'^trips/(?P<tripname>\d+)/(?P<poiname>\d+)/flickrSearch$', 'planner.views.flickr_search_view'),
    url(r'^trips/(?P<tripname>\d+)/(?P<poiname>\d+)/setimage$', 'planner.views.setimage'),
    #url(r'^users', 'planner.views.users'),
    #url(r'^users/(?P<username>)$', 'planner.views.users'),
    # Examples:
    # url(r'^$', 'ctp.views.home', name='home'),
    # url(r'^ctp/', include('ctp.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # url(r'^admin/', include(admin.site.urls)),
)
